﻿@model Genrsis.WorkitemTracking.Web.Models.WorkitemCreateViewModel

<h2>@ViewBag.Title</h2>

<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>

@using (Html.BeginForm())
{
    @Html.ValidationSummary(true)
    <table class="propertylist">
        <tr>
            <td>
                @Html.EditorFor(model => model.Title)
                @Html.ValidationMessageFor(model => model.Title)
            </td>
        </tr>
        <tr>
            <td>
                <table>
                    <tr>
                        <td>
                            <div class="editor-label">
                                @Html.LabelFor(model => model.StatusId)
                            </div>
                            <div class="editor-field">
                                @Html.DropDownListFor(model => model.StatusId, Model.StatusId)
                                @Html.ValidationMessageFor(model => model.StatusId)
                            </div>

                            <div class="editor-label">
                                @Html.LabelFor(model => model.CreatedByUserId)
                            </div>
                            <div class="editor-field">
                                @Html.EditorFor(model => model.CreatedByUserId)
                                @Html.ValidationMessageFor(model => model.CreatedByUserId)
                            </div>

                            <div class="editor-label">
                                @Html.LabelFor(model => model.WorkflowId)
                            </div>
                            <div class="editor-field">
                                @Html.EditorFor(model => model.WorkflowId)
                                @Html.ValidationMessageFor(model => model.WorkflowId)
                            </div>
                        </td>
                        <td>
                            @Html.TextAreaFor(model => model.Description)
                        </td>
                    </tr>
                </table>
            </td>
        </tr>
        <tr>
            <td>
                <input type="submit" value="Create" /> @Html.ActionLink("Back to List", "Index")
            </td>
        </tr>
    </table>
}